package com.chinanet.repository.extended;

import com.querydsl.jpa.JPQLQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.repository.NoRepositoryBean;

import java.io.Serializable;

// 对于QueryDSL查询声明一个自定义扩展基础存储库类
@NoRepositoryBean
public interface ExtendedQuerydslJpaRepository<T,ID extends Serializable> extends JpaRepository<T,ID>,QuerydslPredicateExecutor<T> {
    <T> Page<T> findAll(JPQLQuery jpqlQuery, Pageable pageable);
}
